<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width: 300px;
      height: 300px;
      border: 1px solid pink;
    }
    img{
      width: 100%;
      height: 100%;
    }
    .img1{
      object-fit: contain;
    }
    .img2{
      object-fit: cover;
    }
    .img3{
      object-fit: fill;
    }
    .img4{
      object-fit: none;
    }
    .img5{
      object-fit: revert;
    }
    .img6{
      object-fit: scale-down;
    }
  </style>
</head>
<body>
  <div class="box">
    <img class="img1" src="./123.jpeg" alt="">
  </div>
  <div class="box">
    <img class="img2" src="./123.jpeg" alt="">
  </div>
  <div class="box">
    <img class="img3" src="./123.jpeg" alt="">
  </div>
  <div class="box">
    <img class="img4" src="./123.jpeg" alt="">
  </div>
  <div class="box">
    <img class="img5" src="./123.jpeg" alt="">
  </div>
  <div class="box">
    <img class="img6" src="./123.jpeg" alt="">
  </div>
</body>
</html>